/**
 * Plan name: Login and register
 * Product: Seam Portal
 */
package test;

import core.SeleneseTestCaseEx;

/**
 * @author Roman I.
 *
 */
public class LoginAndRegistration extends SeleneseTestCaseEx {
	
	public LoginAndRegistration(String name) {
		super(name);
	}

	public void setUp() {
		if (configureTest) {
			tc.setEnv("_testtitle", "Login and Register");
			super.setUp();
		}	
	}
	
	/**
	 * 39 Register-Register a new user with valid information 
	 *//*
	@Deprecated
    public void testRegisterUserValidData() {
	
		repEng.newStep("39", "Register User(valid data)");
			
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account
		action.click("link=Register an Account.");
		
		//3. Fill in all fields with valid information
		action.typeByContainsId("email", u.getNewEmail(true));
		action.typeByContainsId("confirmEmail", u.getNewEmail(false));
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", "");
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//A new user should be created successfully
		check.checkTextOnPage("Welcome!");
	}*/
	
	/**
	 * 40 Register-Attempt to register a new user with invalid email account
	 */
    public void testRegisterUserInvalidEmail() {
		repEng.newStep("40", "Register User(invalid email)");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account
		action.click("link=Register an Account.");
		
		//3. Fill in an invalid email to email field
		action.typeByContainsId("firstName", "Tyler");
		action.typeByContainsId("lastName", "Durden");
		action.typeByContainsId("email", "test.com");
		action.typeByContainsId("confirmEmail", "test.com");
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should get message said that the email address is not valid, and no new user created
		check.checkWarningUserCreation("The email you entered is not a valid");
	}
	
	/**
	 * 41 Register-Attempt to register a new user who is already existed
	 */
	public void testRegisterAsExistUser() {
		repEng.newStep("41", "Register User(Existing User)");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account
		action.click("link=Register an Account.");
		
		//3. Enter an email address which already be used
		action.typeByContainsId("firstName", "Tyler");
		action.typeByContainsId("lastName", "Durden");
		action.typeByContainsId("email", tc.getEnv("existuser"));  
		action.typeByContainsId("confirmEmail", tc.getEnv("existuser"));
		action.typeByContainsId("password", tc.getEnv("password"));
		action.typeByContainsId("confirmPassword", tc.getEnv("password"));  //This account is exist - 31 05 2009
		// action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register
		action.click("css=input[value='Register']");
		
		// Get error message said that this email address already be used
		check.checkWarningUserCreation("This email is already used by another user"); 
	}

	/**
	 * 42 Register-Attempt to register a user when Email and Confirm Email does not match
	 */
	public void testRegisterWithDifferentEmail() {
		repEng.newStep("42", "Register User(different email)");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account
		action.click("link=Register an Account.");
		
		//3.Fill in Email and Confirm Email with different address
		action.typeByContainsId("firstName", "Tyler");
		action.typeByContainsId("lastName", "Durden");
		action.typeByContainsId("email", u.getNewEmail(true));	
		action.typeByContainsId("confirmEmail", "test@google.com");
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register
		action.click("css=input[value='Register']");
		
		//Get error message said that the Email and Confirm Email does not match
		check.checkWarningUserCreation("Email and Confirm Email fields should have the same value.");
	}
	
	/**
	 * 43 Register-Attempt to register a new account when Password and Confirm Password does not match
	 */
	public void testRegisterWithDifferentPass() {
		repEng.newStep("43", "Register User(different password)");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account
		action.click("link=Register an Account.");
		
		//3. Enter Password and Confirm Password with different ones
		action.typeByContainsId("firstName", "Tyler");
		action.typeByContainsId("lastName", "Durden");
		action.typeByContainsId("email", u.getNewEmail(true));
		action.typeByContainsId("confirmEmail", u.getNewEmail(false));
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test4321");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register
		action.click("css=input[value='Register']");
		
		//Get message said that the Password and Confirm Password does not match and no new account was created
		check.checkWarningUserCreation("Password and Confirm Password fields should have the same value."); 
	}
	
	/**
	 * 44 Register-Attempt to Register a new user with entering incorrect response
	 */
	public void testRegisterWithIncorrectCaptcha() {    //Captcha was deleted from site
		repEng.newStep("44", "Register User(inccorrect captcha)");
		action.difficultToImplement("Verify captcha");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		//2. Click Register an Account
		//3. Enter Email/Confirm Email/Password/Confirm Password
		//4. Fill in'Solve the operation below' with incorrect response
		//5. Click Register
		//Get error message and no new account was created
	}
	
	/**
	 * 45 Register-Attempt to register a new account with keeping all required fields blank
	 */
	public void testRegisterWithoutData() {
		repEng.newStep("45", "Register User(blank fields)");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account
		action.click("link=Register an Account.");
		
		//3. Do not fill in any fields and click Register button
		action.click("css=input[value='Register']");
		
		//Get error message and no new account was created
		check.checkWarningUserCreation("Validation Error: Value is required."); 
	}
	
	/**
	 * 46 Forgot Password-Enter Email and then click Forgot Password
	 */
	public void testForgotPassWithValidEmail() {
		repEng.newStep("46", "Forgot Password (valid email)");
		
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Enter valid email and click Forgot Password
		action.typeByContainsId("name", "test@mail.com");
		action.clickNoWait("link=exact:Forgot Password?"); //TODO change to action.click after fixing
		
		//3. Check the email
		action.difficultToImplement("Check the email");
		//action.navigateToEmail("www.mail.com", "test1test2test@mail.com", "test1234"); 
		
		//The password should be sent to this email account
		check.difficultToImplement("The password should be sent to this email account");
	}
	
	/**
	 * 47 Forgot Password- Enter an invalid or non-existed email and then click Forgot password
	 *//*
	@Deprecated
	public void testForgotPassWithInvalidEmail() {
		repEng.newStep("47","Forgot Password (Invalid email)");
		
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Enter an invalid or non-existed email
		action.typeByContainsId("name", "test.com");
		
		//3. Click Forgot Password
		action.clickNoWait("link=exact:Forgot Password?"); //TODO change to action.click after fixing
		
		//Get message said that the email is not valid
		check.checkTextOnPage("email is not valid"); //TODO needs to change
	}*/
	
	/**
	 * 48 Login-Login magnet portal with valid email and password
	 *//*
	@Deprecated
	public void testLoginWithValidData() {
		repEng.newStep("48", "Login (valid data)");
		
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
						
		//2. Fill in all fields with valid information
		action.typeByContainsId("name", tc.getEnv("existuser"));
		action.typeByContainsId("password", tc.getEnv("password"));
				
		//3. Click Login button
		action.click("css=input[value='Login']");
		
		//Login should be successfully
		check.verifyTitle("Welcome"); 
	}*/
	
	/**
	 * 49 Login- Attempt to use invalid or non-existed email to login
	 */
	public void testLoginWithInvalidEmail() {
		repEng.newStep("49", "Login (invalid email)");
		
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Enter invalid or non-existed email.
		// action.typeByContainsId("email", "test.com");		
		action.typeByContainsId("name", u.getNewEmail(true));
		action.typeByContainsId("password", "test1234");
				
		//3. Click Login button
		action.click("css=input[value='Login']");
		
		//Stop user to login. Prompts: Please check email and password
		check.checkWarningUserCreation("Please check email and password"); 
	}
	
	/**
	 * 50 Login-Attempt to login with invalid password
	 */
	public void testLoginWithInvalidPass() {
		repEng.newStep("50","Login (invalid pass)");
		
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Enter valid Email.
		action.typeByContainsId("name", tc.getEnv("existuser"));
		
		//3. Enter invalid password.
		action.typeByContainsId("password", tc.getEnv("existuser") + "1");
		
		//3. Click Login button
		action.click("css=input[value='Login']");
		
		//Stop user to login. Prompts: Please check email and password.
		check.checkWarningUserCreation("Please check email and password");
	}
	
	/**
	 * 64 Register- Attempt to register a new user with keeping 'Solve the operation below' blank
	 */
	public void testRegisterWithSolveBlank() { 
		repEng.newStep("64", "Register User ('Solve the operation below' blank)");
		action.difficultToImplement("Verify captcha");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		//2. Click Register an Account
		//3. Fill in all fields with valid information
		//4. Keep 'Solve the operation below' blank
		//5. Click Register button
		//Get message said it's required field
	}
	
	/**
	 * 114 Register-Check the link of click here to login
	 */
	public void testRegisterCheckLinkclickHere() {
		repEng.newStep("114", "Check the link of click here to login");
		
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Register a new account.
		action.click("link=Register an Account.");

		String email = u.getNewEmail(true);
		action.typeByContainsId("firstName", "Tyler");
		action.typeByContainsId("lastName", "Durden");
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 

		action.click("css=input[value='Register']");
		
		//3. Click the link of Click here to login 
		action.click("link=Click here to login");
		
		//Go to login page after step3
		check.checkTextOnPage("Login");
		
		//4. Login with newly created user. 
		action.typeByContainsId("email", email);
		action.typeByContainsId("password", "test1234");
		action.click("css=input[value='Login']");
		
		//Login successfully after step4.
		check.checkTextOnPage("Welcome"); 		
	}
	
	/**
	 * 224 Register - User should receive an email reminder after registering an account.
	 */
	public void testEmailReminderAfterRegistering() {
		repEng.newStep("224", "Email reminder after registering");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Click Register an Account link
		action.click("link=Register an Account.");
		
		//3. Fill in all fields with valid data
		String email = u.getNewEmail(true);
		action.typeByContainsId("firstName", "Tyler");
		action.typeByContainsId("lastName", "Durden");
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//New account is created successfully. 
		check.checkTextOnPage("Welcome");
		
		//User shoud recieve a email reminder about activation after registering an account.
		check.difficultToImplement("User shoud recieve a email reminder about activation after registering an account.");
	}
	
/*	*//**
	 * 225 Register-User should receive an email reminder after clicking "Forgot Password" link
	 *//*
	@Deprecated
	public void testEmailReminderAfterFogotPass() {
		repEng.newStep("225", "Forgot Password(valid email)");
		//1. Open http://hobbes.ontometrics.com/magnetportal/ in IE
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Enter existent email and click Forgot Password
		action.typeByContainsId("name", tc.getEnv("existuser"));
		action.clickNoWait("link=exact:Forgot Password?");
		
		//3. Check the email
		action.difficultToImplement("Check the email");
		
		//The password should be sent to this email account
		check.difficultToImplement("The password should be sent to this email account");
		//check.checkTextEmail("password"); 
	}*/
	
	
	/**
	 * 238 Login-Login with an email which has not been activated.
	 */
	public void testLoginWithoutActivated() {
		repEng.newStep("238", "Login with an email which has not been activated.");
		//1. Launch http://hobbes.ontometrics.com/magnetportal/
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Enter valid email which has not been activated and password to login.
		String email = u.getNewEmail(false);
		action.typeByContainsId("name", email);
		action.typeByContainsId("password", "test1234");
				
		//3. Click Login button
		action.click("css=input[value='Login']");
		
		
		// Get error message and can not login. 
		check.checkTextOnPage("Some error message.(Need change text after bug fixing)"); //TODO Need change text after bug fixing
	}

	/**
	 * 252 Login with an email which has been activated.
	 */
	public void testLoginWitActivated() {
		repEng.newStep("252", "Login with an email which has been activated.");
		//1. Launch http://hobbes.ontometrics.com/magnetportal/
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2.  Enter valid email which has been activated and password to login.
		String email = u.getNewEmail(false); //TODO needs to change in activated account
		action.typeByContainsId("name", email);
		action.typeByContainsId("password", "test1234");
		action.click("css=input[value='Login']");
		
		// The current account can login successfully. 
		check.checkTextOnPage("Welcome");
	}
	
	
	/**
	 * 254 Logout-Check the Logout function
	 */
	public void testLogout() {
		repEng.newStep("254", "Check the Logout function");
		//1. Launch http://hobbes.ontometrics.com/magnetportal/
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2.  Enter valid email which has been activated and password to login.
		
		String email = u.getNewEmail(false); //TODO needs to change in activated account
		action.typeByContainsId("name", email);
		action.typeByContainsId("password", "test1234");
		action.click("css=input[value='Login']");
		
		// The current account can login successfully. 
		check.checkTextOnPage("Welcome");
		
		//3. Click the "Logout" button.
		action.logoutIfLogged();
		
		//The website will go back to the Login page.
		check.checkTextOnPage("Login");
	}
	
	
	/**
	 * 429 Register-Let Solve the operation below is blank
	 */
	public void testLetCaptchaBlank() {
		repEng.newStep("429", "Let Solve the operation below is blank");
		//1. Launch http://hobbes.ontometrics.com/magnetportal/
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();

		//2. Goto Register page
		//3. Fill in this page with valid data and let Solve the operation below as blank
		//4. Click Register button
		
		//Should prompt to input valid data in  Solve the operation below firstly.
		check.difficultToImplement("Impossible to check capthca, it was disabled");
	}
	
	
	/**
	 * 430 Register-Input valid data into Solve the operation below
	 */
	public void testLetCaptchaWithValidData() {
		repEng.newStep("430", "Input valid data into Solve the operation below");
		//1. Launch http://hobbes.ontometrics.com/magnetportal/
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();

		//2. Goto Register page
		//3. Fill in this page with valid data
		//4. Click Register button
		
		//Should register user successfully.
		check.difficultToImplement("Impossible to check capthca, it was disabled");
	}
	
	
	/**
	 * 431 Register-Input invalid data into Solve the operation below
	 */
	public void testLetCaptchaWithInValidData() {
		repEng.newStep("431", "Input invalid data into Solve the operation below");
		//1. Launch http://hobbes.ontometrics.com/magnetportal/
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();

		//2. Goto Register page
		//3. Fill in this page with valid data and invalid data into Solve the operation below
		//4. Click Register button
		
		// Should give the prompt message that Solve the operation below is invalid
		// Should fail to register the user
		check.difficultToImplement("Impossible to check capthca, it was disabled");
	}
	
	
	/**
	 * 550 Login- Check logged in user
	 */
	public void testCheckLoggedInUser() {
		repEng.newStep("550", "Login- Check logged in user");
		// 1.Artist log in Magnet  portal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		 
		String email = u.getNewEmail(false); //TODO needs to change in activated account
		action.typeByContainsId("name", email);
		action.typeByContainsId("password", "test1234");
		action.click("css=input[value='Login']");
		
		//2. Check logged in user  beside Logout button
		check.checkTextOnPage("Welcome");
		
		//Should display correct logged in account email beside Logout button
		check.checkElementOnPage("css=td:contains('" + email + "') + td:contains('|') + td:contains('logout')");
	}
	
	/**
	 * 681 Register-Input invalid First Name
	 */
    public void testRegisterUserInvalidFistName() {
		repEng.newStep("681", "Register-Input invalid First Name");
		//1. .Launch http://hobbes.ontometrics.com/magnetportal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Turn to Register page
		action.click("link=Register an Account.");
		
		//3. Input invalid First Name
		action.typeByContainsId("firstName", "?");
		
		//4. Fill in other fields with valid data
		action.typeByContainsId("lastName", "Durden");
		String email = u.getNewEmail(true);
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should give the prompt First Name is invalid.
		check.checkWarningUserCreation("Should give the prompt First Name is invalid");
	}
	
	/**
	 * 682 Register-Input valid First Name
	 */
    public void testRegisterUserValidFistName() {
		repEng.newStep("682", "Register-Input valid First Name");
		//1. .Launch http://hobbes.ontometrics.com/magnetportal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Turn to Register page
		action.click("link=Register an Account.");
		
		//3. Input valid First Name
		action.typeByContainsId("firstName", "Tyler");
		
		//4. Fill in other fields with valid data
		action.typeByContainsId("lastName", "Durden");
		String email = u.getNewEmail(true);
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should accept inputed the First Name
		check.checkTextOnPage("Welcome");
	}
    
    /**
	 * 683 Register-Let First Name blank
	 */
    public void testRegisterUserBlankFistName() {
		repEng.newStep("683", "Register-Let First Name blank");
		//1. .Launch http://hobbes.ontometrics.com/magnetportal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Turn to Register page
		action.click("link=Register an Account.");
		
		//3. Let First Name blank
		action.typeByContainsId("firstName", "");
		
		//4. Fill in other fields with valid data
		action.typeByContainsId("lastName", "Durden");
		String email = u.getNewEmail(true);
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should accept inputed the First Name
		check.checkTextOnPage("First Name: Validation Error");
	}
    
    
	/**
	 * 684 Register-Input invalid Last Name
	 */
    public void testRegisterUserInvalidLastName() {
		repEng.newStep("684", "Register-Input invalid Last Name");
		//1. .Launch http://hobbes.ontometrics.com/magnetportal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Turn to Register page
		action.click("link=Register an Account.");
		
		//3. Input invalid Last Name
		action.typeByContainsId("lastName", "?");
		
		//4. Fill in other fields with valid data
		action.typeByContainsId("firstName", "Tyler");
		String email = u.getNewEmail(true);
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should give the prompt Last Name is invalid.
		check.checkWarningUserCreation("Should give the prompt Last Name is invalid.");
	}
	
	/**
	 * 685 Register-Input valid First Name
	 */
    public void testRegisterUserValidLastName() {
		repEng.newStep("682", "Register-Input valid Last Name");
		//1. .Launch http://hobbes.ontometrics.com/magnetportal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Turn to Register page
		action.click("link=Register an Account.");
		
		//3. Input valid Last Name
		action.typeByContainsId("lastName", "Durden");
		
		
		//4. Fill in other fields with valid data
		action.typeByContainsId("firstName", "Tyler");
		String email = u.getNewEmail(true);
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should accept inputed the First Name
		check.checkTextOnPage("Welcome");
	}
    
    /**
	 * 686 Register-Let Last Name blank
	 */
    public void testRegisterUserBlankLastName() {
		repEng.newStep("686", "Register-Let Last Name blank");
		//1. .Launch http://hobbes.ontometrics.com/magnetportal
		actionset.launchBrowserIfNeed();
		action.logoutIfLogged();
		
		//2. Turn to Register page
		action.click("link=Register an Account.");
		
		//3. Let First Name blank
		action.typeByContainsId("lastName", "");
		
		
		//4. Fill in other fields with valid data
		action.typeByContainsId("firstName", "Tyler");
		String email = u.getNewEmail(true);
		action.typeByContainsId("email", email);
		action.typeByContainsId("confirmEmail", email);
		action.typeByContainsId("password", "test1234");
		action.typeByContainsId("confirmPassword", "test1234");
		//action.typeByContainsId("verifyCaptcha", ""); 
		
		//4. Click Register button
		action.click("css=input[value='Register']");
		
		//Should accept inputed the First Name
		check.checkTextOnPage("Last Name: Validation Error");
	}
    
    
    
    
	/* Service method. Must be last in Class */
    public void testCloseBrowser() {
    	/* It closes current browser and kill Selenium session */
    	action.closeBrowser();
    }
	

}
